*===============================================================================
*
*					WORKER BELIEFS ABOUT OUTSIDE OPTIONS
*		(c)	Simon Jaeger, Christopher Roth, Nina Roussille, Benjamin Schoefer
*							  2023 December 5
*							   SOEP-IAB Data 
*
*===============================================================================


********************************************************************************
*
*
*	    0 Master Dofile
*
*
********************************************************************************



* 1. Set Paths and Settings
*-------------------------------------------------------------------------------


version 14     
clear
set more off   

* runname and macros
global runname run_iab_code

local temp_date: display %td_CCYY_NN_DD date(c(current_date), "DMY")
local date = subinstr(trim("`temp_date'"), " " , "-", .)
local time = subinstr("`c(current_time)'", ":", "", .)

global root N:\Ablagen\D01700-Projekte\D01700-SOEP-IEB_prep\
global out $root/out/infrastructure/run_`date'_`time'_${runname}

do "N:\Ablagen\D01700-Projekte\D01700-SOEP-IEB_prep\prog\profile.do"
adopath ++ "N:\Ablagen\D01700-Projekte\D01700-SOEP-IEB_prep\prog\ado"
cd "N:\Ablagen\D01700-Projekte\D01700-SOEP-IEB_prep\"
global josua = 0

set scheme s1color
cap noisily set linesize 255
cap graph set window fontface default
set seed 6000
set max_preservemem 50g


*=== Install binscatter and other programs ===*
cap noisily fdzinstall binscatter
cap noisily fdzinstall reghdfe
cap noisily fdzinstall winsor
cap noisily fdzinstall ftools
cap noisily fdzinstall addplot
cap noisily fdzinstall elasticregress
cap noisily fdzinstall groups
cap noisily fdzinstall tuples
cap noisily fdzinstall outreg
cap noisily fdzinstall outreg2
cap noisily fdzinstall coefplot

*=== Call do-files ===*
cap noisily do ${prog}/1_data_prep.do 
cap noisily do ${prog}/2_coworker_wagechanges.do 
cap noisily do ${prog}/3_firm_turnover.do 
cap noisily do ${prog}/4_occupationrank.do 
cap noisily do ${prog}/5_machinelearning.do 
cap noisily do ${prog}/6_soep_clean.do 
cap noisily do ${prog}/7_finalize.do 

cap noisily do ${prog}/cell_calculations_exp.do 

cap noisily do ${prog}/TableI.do 
cap noisily do ${prog}/TableA02.do 
cap noisily do ${prog}/TableD01.do 

cap noisily do ${prog}/FigureII.do 
cap noisily do ${prog}/FigureIIIab.do 
cap noisily do ${prog}/FigureIV.do 
cap noisily do ${prog}/FigureVab.do 
cap noisily do ${prog}/FigureVIabcd.do 
cap noisily do ${prog}/FigureVIIabcdef.do 

cap noisily do ${prog}/FigureB01.do 
cap noisily do ${prog}/FigureB02.do 
cap noisily do ${prog}/FigureB04ab.do 
cap noisily do ${prog}/FigureB05ab.do 
cap noisily do ${prog}/FigureB07abcd.do 
cap noisily do ${prog}/FigureB09.do 


log close
